import request from '@/utils/request';

const seqSampleReportApi = {};

seqSampleReportApi.newestReport = (sampleId) => {
	return request({
		url: '/platform-api/seq-sample-data-report/newest-report/' + sampleId,
		method: 'get',
	})
}
seqSampleReportApi.reportList = (sampleId) => {
	return request({
		url: '/platform-api/seq-sample-data-report/seq-report-list/' + sampleId,
		method: 'get',
	})
}
seqSampleReportApi.auditSample = (params) => {
	return request({
		url: '/platform-api/seq-sample-data-report/audit-sample',
		method: 'put',
    data: params,
	})
}
seqSampleReportApi.downloadReport = (id) => {
	return request({
		url: '/platform-api/seq-sample-data-report/download-report/' + id,
		method: 'get',
		responseType: 'arraybuffer',
	})
}
seqSampleReportApi.parseReport = (id) => {
	return request({
		url: '/platform-api/seq-sample-data-report/parse/' + id,
		method: 'post',
	})
}

seqSampleReportApi.diff = (id) => {
	return request({
		url: '/platform-api/seq-sample-data-report/diff/' + id,
		method: 'get',
	})
}
seqSampleReportApi.delSampleTemplateFile = ( id) => {
	return request({
		url: '/platform-api/seq-sample-data-report/del-template-file/' + id,
		method: 'put',
	})
}
seqSampleReportApi.getSampleTemplateFilePath = (seqSampleId, id) => {
	return request({
		url: '/platform-api/seq-sample-data-report/template-file-path/' + seqSampleId + '/' + id,
		method: 'get',
	})
}
seqSampleReportApi.copyApplicationTemplate = (id) => {
	return request({
		url: '/platform-api/seq-sample-data-report/copy-app-template/' + id,
		method: 'put',
	})
}
seqSampleReportApi.page = (params) => {
	return request({
		url: '/platform-api/seq-sample-data-report/page',
		method: 'get',
		params: params,
	})
}
seqSampleReportApi.add = (params) => {
	return request({
		url: '/platform-api/seq-sample-data-report',
		method: 'post',
		data: params,
	})
}
seqSampleReportApi.update = (params) => {
	return request({
		url: '/platform-api/seq-sample-data-report',
		method: 'put',
		data: params,
	})
}
seqSampleReportApi.get = (id) => {
	return request({
		url: '/platform-api/seq-sample-data-report/' + id,
		method: 'get',
	})
}
seqSampleReportApi.delete = (id) => {
	return request({
		url: '/platform-api/seq-sample-data-report/' + id,
		method: 'delete',
	})
}

export default seqSampleReportApi